
<!DOCTYPE html>
<html>


<!-- Mirrored from www.zi-han.net/theme/hplus/form_editors.html by HTTrack Website Copier/3.x [XR&CO'2014], Wed, 20 Jan 2016 14:19:35 GMT -->
<head>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">

    <link rel="shortcut icon" href="/static/favicon.ico"> <link href="/static/css/bootstrap.min14ed.css?v=3.3.6" rel="stylesheet">
    <link href="/static/css/font-awesome.min93e3.css?v=4.4.0" rel="stylesheet">
    <link href="/static/css/animate.min.css" rel="stylesheet">
    <link href="/static/css/plugins/summernote/summernote.css" rel="stylesheet">
    <link href="/static/css/plugins/summernote/summernote-bs3.css" rel="stylesheet">
    <link href="/static/css/style.min862f.css?v=4.1.0" rel="stylesheet">

</head>

<body class="gray-bg">
<div class="wrapper wrapper-content">

    <div class="row">
        <div class="col-sm-12">
            <div class="ibox float-e-margins">
                <div class="ibox-title">
                    <h5>撰写新闻</h5><br>
                    <div class="ibox-tools">
                        <a class="collapse-link">
                            <i class="fa fa-chevron-up"></i>
                        </a>
                        <a class="dropdown-toggle" data-toggle="dropdown" href="form_editors.html#">
                            <i class="fa fa-wrench"></i>
                        </a>
                        <a class="close-link">
                            <i class="fa fa-times"></i>
                        </a>
                    </div>
                </div>
                <div class="col-sm-9">
                    <input id="title" type="text" name="title" class="form-control" placeholder="新闻标题">
                </div>
                <div class="ibox-content no-padding">

                    <div class="summernote" id="news_content">
                        <h2>【文章标题】</h2>
                        <p>在这里输入新闻内容...</p>
                    </div>

                </div>
                <button class="btn btn-primary" onclick="addNews()">发布</button>
            </div>
        </div>
    </div>
</div>
<script src="/static/js/jquery.min.js?v=2.1.4"></script>
<script src="/static/js/bootstrap.min.js?v=3.3.6"></script>
<script src="/static/js/content.min.js?v=1.0.0"></script>
<script src="/static/js/plugins/summernote/summernote.min.js"></script>
<script src="/static/js/plugins/summernote/summernote-zh-CN.js"></script>
<script>
    $(document).ready(function() {
        $(".summernote").summernote({
            lang: "zh-CN"
        })

    });

    function addNews() {
        $.ajax({
            url: '/addNews',
            type: 'post',
            data: {
                title: $("#title").val(),
                content: $("#news_content").code()
            },
            success: function(data){
                console.log(data)
                alert("已发布！")
            },
            fail: function(data){
                console.log(data)
            }
        })
    }
    var edit = function() {
        $("#eg").addClass("no-padding");
        $(".click2edit").summernote({
            lang: "zh-CN",
            focus: true
        })
    };
    var save = function() {
        $("#eg").removeClass("no-padding");
        var aHTML = $(".click2edit").code();
        $(".click2edit").destroy()
    };
</script>
<script type="text/javascript" src="http://tajs.qq.com/stats?sId=9051096" charset="UTF-8"></script>
</body>


<!-- Mirrored from www.zi-han.net/theme/hplus/form_editors.html by HTTrack Website Copier/3.x [XR&CO'2014], Wed, 20 Jan 2016 14:19:35 GMT -->
</html>
